﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Cofe.Core;
using Cofe.Core.Implements;
using Cofe.Core.Interfaces;
using Cofe.Core.Service;
using Cofe.IO.Compress;
using Cofe.IO.Implements;

namespace Cofe.IO
{
    public class RegisterModule : RegisterModuleBase
    {
        public RegisterModule(bool dbSupport = true)
        {           
            //Add all services here.
            base.registerServices(
#if NETFX_CORE
                new WindowsStorageVolumeFactory(),
                new WindowsStorageEntryTypeProvider(),
                new SystemIOCompressionWrapper(),
#else
new SystemIOVolumeFactory(),
                new SevenZipWrapper(),
                new SystemIOEntryTypeProvider(),

                
#endif
 new CompressPropertyProvider.Factory(),
                new FSIInterfaceProvider()

                );

            if (dbSupport)
                base.registerServices(
                new EFFileSystemInfoConfig());


            base.registerServices(
                new FileSystemInfoPropertyDefinitions(),
                new FileInfoPropertyDefinitions(),
                new DirectoryInfoPropertyDefinitions(),
                new FileTypeInfoPropertyDefinitions()
                );
        }
    }
}
